import dayjs from "dayjs";
export const adminColumns = [
    {
        prop: "username",
        label: "用户名",
        minWidth: "80px",
    },
    {
        prop: "truename",
        label: "姓名",
        minWidth: "80px",
    },
    {
        prop: "phone",
        label: "手机号码",
        width: "120px",
    },
    {
        prop: "forbidden",
        label: "是否禁用",
        width: "90px",
        render(row: any) {
          return h(
            "div",
            {
              style: {
                color: row.forbidden?"#e6a23c":"#67c23a",
                fontSize: "12px",
              },
            },
            row.forbidden ? "禁用" : "启用"
          );
        },
    },
    {
        prop: "singleLoginFlagDesc",
        label: "是否单一登录",
        width: "120px"
    },
    {
        prop: "jobFlag",
        label: "是否在职",
        width: "100px",
         render(row: any) {
          return h(
            "div",
            {
              style: {
                color: row.jobFlag===1?'':"#e6a23c",
                fontSize: "12px",
              },
            },
            row.jobFlag===1 ? "在职" : "离职"
          );
        },
    },

    {
        prop: "startYm",
        label: "社保起缴年月",
        width: "120px",
        render(row: any) {
          return h(
            "div",
            {
              style: {
                color: "#666",
                fontSize: "12px",
              },
            },
            dayjs(row.date).format("YYYY-MM-DD")
          );
        },
    }
];
